<div class="col-sm-12 col-md-12" ng-show="current == 1">

	<h4 class="heading">
		数据预览( <strong>数据名称：{{data.dataSetName}}</strong> )
	</h4>
	<div class="alert alert-danger alert-dismissable" ng-if="!data.dataDefId">
		<a data-dismiss="alert" class="close">×</a>
		<strong>操作说明：</strong> 请点击“表头列标题”设置表字段结构信息。
		 如果列标题长度超过20个字符超出部分将会被截去。
	</div>
	<div class="table-scroll">
		<table class="table table-striped table-bordered table-condensed  table-costom	">
			<thead>
				<tr>
<!-- 					<th width="40px">序号</th> -->
					<th ng-repeat="item in columns" style="cursor: pointer"  data-toggle="modal" title="{{item.columnDesc}}" data-target="{{data.dataDefId?'#nodo':'#edit1'}}"
						ng-click="edit(item)" ng-style="{color:item.ignore?'red':''}">
                        <pre class="no-pre no-wrap" ng-bind-html="item.columnDesc | overflow:15:'...' | makeSpace"></pre>
                    </th>
				</tr>
			</thead>
			<tbody>
				<tr class="rowlink" ng-repeat="itemArr in list">
					<td ng-repeat="item in itemArr">
                        <pre class="no-pre no-wrap" ng-bind-html="item | makeSpace"></pre>
					</td>
				</tr>
			</tbody>
		</table>
	</div>

	<h4 class="heading">设置预览</h4>

	<table class="table table-striped table-bordered table-condensed index-center table-costom">
		<thead>
			<tr>
				<th>序号</th>
<!-- 				<th>列名</th> -->
				<th>字段名</th>
				<th>数据类型</th>
				<th>数据长度</th>
				<th>概念类型</th>
			</tr>
		</thead>
		<tbody>
			<tr class="rowlink" ng-repeat="item in columns" ng-class="{disabled:item.ignore}">
				<td>{{$index+1}}</td>
<!-- 				<td>{{item.columnName}}</td> -->
				<td>{{item.columnDesc}}</td>
				<td>{{item.dataType}}</td>
				<td>{{item.length}}</td>
				<td>{{item.conceptModelDesc}}</td>
			</tr>
		</tbody>
	</table>

	<div class="row">
		<div class="col-sm-5 col-md-5"></div>
		<div class="col-sm-7 col-md-7">
			<button class="btn btn-default btn-primary" type="button" ng-click="toPage(0)">返回</button>
			<button class="btn btn-default btn-success" type="button" ng-click="saveAll()">保存</button>
		</div>
	</div>
	<!-- 修改对话框 -->
	<div class="modal fade" id="edit1" tabindex="-1" role="dialog" aria-hidden="true">

		<div class="modal-dialog">
			<form role="form" class="form-horizontal" name="editForm" novalidate="novalidate">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title">字段信息</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<div class="col-sm-12 col-md-12 form-horizontal">
								<div class="form-group">
									<label class="col-lg-2 control-label">概念类型</label>
									<div class="col-lg-10">
										<select class="form-control span96" ng-model="$parent.gnmx" ng-change="conceptModelDicInit($parent.gnmx)"
											ng-options="item as item.conceptModelDesc for item in cls">
											<option value="">请选择</option>
										</select>
									</div>
								</div>
 
								<div class="form-group">
									<label class="col-lg-2 control-label">字段名</label>
									<div class="col-lg-10">
										<input type="text" placeholder="字段名" ng-model="editItem.columnDesc" class="form-control span96" ng-disabled="$parent.gnmx" required ng-maxlength="20" ng-trim maxlength="20" ng-pattern="/^((?!<|>|\?).)+$/" data-valid-tip="{ required : '字段名为必须填项' , maxlength:'最大长度为20个字符',pattern:'字段名不允许存在 <、>、? '}" data-valid-pos="bottom" name="columnDesc">
									
										<span class="mustItem">*</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-lg-2 control-label">数据类型</label>
									<div class="col-lg-10">
										<select class="form-control span96" ng-model="editItem.dataType" required name="dataType"
											ng-options="item.dataTypeId as item.dataTypeName for item in types" ng-disabled="$parent.gnmx"
											ng-change="initLength(editItem)"
											>
										</select>
										<span class="mustItem">*</span>
									</div>
								</div>
								<div class="form-group" ng-if="isShowLength">
									<label class="col-lg-2 control-label">数据长度</label>
									<div class="col-lg-10">
										<input type="text" placeholder="数据长度" name="length" ng-model="editItem.length" class="form-control span96" 
											my-valid="customeValid()"  maxlength="4" ng-pattern="/^[1-9][0-9]*$/" 
											data-valid-tip="{ pattern : '数据长度只可输入大于0的整数' ,numValid:'数据长度 最大值为2000',floatValid:'数据长度最大值为38'}"
											data-valid-pos="bottom"
											 maxlength="4">
											 <span class="mustItem">*</span>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-primary" ng-click="reset()">重置</button>
							<button type="button" class="btn btn-primary" ng-click="saveEdit($event.target);gnmx=null"
							ng-disabled="editForm.$invalid">保存设置</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</form>
		</div>
		<!-- /.modal-dialog -->

	</div>
</div>